#include "hero.h"
void Hero::move(direction dir)
{
  Serial.println("Hero move ...");
  extern UTFT* myGLCD;
  myGLCD->drawRect(0,0,100,100);
  delay(1000);
//  myScene->clrScr();

  if(dir==left)
  {
    myGLCD->drawBitmap(this->x,this->y,this->width,this->height,this->stand_left);
    delay(10);
    this->x--;
    myGLCD->drawBitmap(this->x,this->y,this->width,this->height,this->move_left);
    delay(10);
    this->x--;
    myGLCD->drawBitmap(this->x,this->y,this->width,this->height,this->stand_left);
    delay(10);
  }
  else
  {
//    myGLCD->drawBitmap(x,y,width,height,stand_right);
//    delay(10);
//    x++;
//    myGLCD->drawBitmap(x,y,width,height,move_right);
//    delay(10);
//    x++;
    extern prog_uint16_t mario_1[0x200];
    myGLCD->drawBitmap(0,0,16,32,mario_1);
    delay(10);
    delay(1000);
      myGLCD->clrScr();
  }
};


